package com.hzqy.persistence.dao.epg;


import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.hzqy.persistence.dao.core.PersistenceDao;
import com.hzqy.web.vo.CmContentVo;
import com.hzqy.web.vo.activity.ActivityVoteUserVo;


@Repository
public class HappyDao extends PersistenceDao<CmContentVo, Integer> {

	public int selectHappyCount(Map<String, Object> map) {
		return getSqlSession().selectOne(this.getNamespace()+"selectHappyCount",map);
	}
	
	public List<CmContentVo> selectHappyList(Map<String, Object> map){
		return getSqlSession().selectList(this.getNamespace()+"selectHappyList",map);
	}
	
	public List<CmContentVo> selectHappyListExcel(Map<String, Object> map){
		return getSqlSession().selectList(this.getNamespace()+"selectHappyListExcel",map);
	}

	/*public int selectSumVotenum(int f_cc_id) {
		Object selectOne = getSqlSession().selectOne(this.getNamespace()+"selectSumVotenum",f_cc_id);
		if (selectOne==null) {
			return 0;
		}else {
			return (int)selectOne;
		}
	}*/
	
	public int insertVoteUser(Map<String, Object> map) {
		return getSqlSession().insert(this.getNamespace() +"insertVoteUser", map);
	}

	public int updateContenStatus(Map<String, Object> map) {
		return getSqlSession().update(this.getNamespace()+ "updateContenStatus",map);
	}
	public int deleteContenStatus(Map<String, Object> map) {
		return getSqlSession().update(this.getNamespace()+ "deleteContenStatus",map);
	}
	
	public int ContenStatusNo(Map<String, Object> map) {
		return getSqlSession().update(this.getNamespace()+ "ContenStatusNo",map);
	}
}
